import { HoxRoot } from 'hox';
import ReactDOM from 'react-dom/client';

import CacheRouter from '@/components/AuthRoutes/components/CacheRouter';

import App from './App';
import GlobalConfig from './components/GlobalConfig';

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(
  <HoxRoot>
    <CacheRouter keepalive={['/database']}>
      <GlobalConfig>
        <App />
      </GlobalConfig>
    </CacheRouter>
  </HoxRoot>,
);
